<!DOCTYPE html>



  


<html class="theme-next muse use-motion" lang="zh-Hans">
<head><meta name="generator" content="Hexo 3.9.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
















  
  
  <link href="lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">







<link href="lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="css/main.css?v=5.1.4" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="混音档案,">










<meta name="description" content="本文分享四条混音技巧，辅助你在声学条件不够好的环境下做出正确的判断。混音虽说是耳闻为主，但再依靠一些小技巧，就能得到更多提升空间。 技巧 1：光谱分析我们先拿 techno 音乐来说，底鼓和贝司线是整首曲子的基底，然而要处理好它们之间「打架」的重叠频率，就需要足够的细心。 你或许已经知道如何进行低切，或把贝司的低频 EQ 与底鼓融合。但在没有优秀的低频监听单元的情况下，甚至你的房间环境也并不够理想">
<meta name="keywords" content="混音档案">
<meta property="og:type" content="article">
<meta property="og:title" content="提升作品水平的 4 条混音技巧">
<meta property="og:url" content="https://songjianzaina.gitee.io/提升作品水平的-4-条混音技巧.html">
<meta property="og:site_name" content="有瓣教育 – 分享有用知识">
<meta property="og:description" content="本文分享四条混音技巧，辅助你在声学条件不够好的环境下做出正确的判断。混音虽说是耳闻为主，但再依靠一些小技巧，就能得到更多提升空间。 技巧 1：光谱分析我们先拿 techno 音乐来说，底鼓和贝司线是整首曲子的基底，然而要处理好它们之间「打架」的重叠频率，就需要足够的细心。 你或许已经知道如何进行低切，或把贝司的低频 EQ 与底鼓融合。但在没有优秀的低频监听单元的情况下，甚至你的房间环境也并不够理想">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2020-01-06T01:52:04.474Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="提升作品水平的 4 条混音技巧">
<meta name="twitter:description" content="本文分享四条混音技巧，辅助你在声学条件不够好的环境下做出正确的判断。混音虽说是耳闻为主，但再依靠一些小技巧，就能得到更多提升空间。 技巧 1：光谱分析我们先拿 techno 音乐来说，底鼓和贝司线是整首曲子的基底，然而要处理好它们之间「打架」的重叠频率，就需要足够的细心。 你或许已经知道如何进行低切，或把贝司的低频 EQ 与底鼓融合。但在没有优秀的低频监听单元的情况下，甚至你的房间环境也并不够理想">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/booya/',
    scheme: 'Muse',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":true,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>
<!--谷歌广告验证代码-->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({
          google_ad_client: "ca-pub-2626449904708114",
          enable_page_level_ads: true
     });
</script>
<!--谷歌广告验证代码-->



  <link rel="canonical" href="https://songjianzaina.gitee.io/提升作品水平的-4-条混音技巧.html">





  <title>提升作品水平的 4 条混音技巧 | 有瓣教育 – 分享有用知识</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/booya/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">有瓣教育 – 分享有用知识</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">有瓣知识 – 有伴你我</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="http://www.newban.cn/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br>
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br>
            
            归档
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br>
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <div class="popup search-popup local-search-popup">
  <div class="local-search-header clearfix">
    <span class="search-icon">
      <i class="fa fa-search"></i>
    </span>
    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
    <div class="local-search-input-wrapper">
      <input autocomplete="off" placeholder="搜索..." spellcheck="false" type="text" id="local-search-input">
    </div>
  </div>
  <div id="local-search-result"></div>
</div>



    </div>
  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://songjianzaina.gitee.io">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="有瓣">
      <meta itemprop="description" content>
      <meta itemprop="image" content="images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="有瓣教育 – 分享有用知识">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">提升作品水平的 4 条混音技巧</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2019-11-13T10:48:34+08:00">
                2019-11-13
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>本文分享四条混音技巧，辅助你在声学条件不够好的环境下做出正确的判断。混音虽说是耳闻为主，但再依靠一些小技巧，就能得到更多提升空间。</p>
<h4 id="技巧-1：光谱分析"><a href="#技巧-1：光谱分析" class="headerlink" title="技巧 1：光谱分析"></a>技巧 1：光谱分析</h4><p>我们先拿 techno 音乐来说，底鼓和贝司线是整首曲子的基底，然而要处理好它们之间「打架」的重叠频率，就需要足够的细心。</p>
<p>你或许已经知道如何进行低切，或把贝司的低频 EQ 与底鼓融合。但在没有优秀的低频监听单元的情况下，甚至你的房间环境也并不够理想，该如何处理呢？</p>
<p><strong>使用光谱分析器。</strong>这是在硬件条件有限时，最能够帮到你的方法。下面是三款免费的光谱分析工具，你可以从中选择，或使用你所熟悉的分析工具。</p>
<p><a href="http://www.voxengo.com/product/span/" target="_blank" rel="noopener">http://www.voxengo.com/product/span/</a><br><a href="http://www.bluecataudio.com/Products/Product_FreqAnalyst/" target="_blank" rel="noopener">http://www.bluecataudio.com/Products/Product_FreqAnalyst/</a><br><a href="https://www.meldaproduction.com/plugins/product.php?id=MAnalyzer" target="_blank" rel="noopener">https://www.meldaproduction.com/plugins/product.php?id=MAnalyzer</a></p>
<h5 id="步骤"><a href="#步骤" class="headerlink" title="步骤"></a>步骤</h5><ul>
<li>在立体声总输出轨上启用一个频谱分析器</li>
<li>Solo 底鼓轨，在分析器中观察频段</li>
<li>再 solo 贝司轨，这样便能直观看出它占用的频段</li>
<li>逐条检查其他轨道的频段</li>
</ul>
<p>Voxengo SPAN 允许输入两个声源，这样你就可以方便地在一个插件里完成频率对比。</p>
<h4 id="技巧-2：走出泥潭"><a href="#技巧-2：走出泥潭" class="headerlink" title="技巧 2：走出泥潭"></a>技巧 2：走出泥潭</h4><p>还是低频的事情，总是会有各种各样的麻烦：监听音箱的低频表现欠佳，监听环境的声学数据不理想，或是半夜怕扰民不敢开足低频音量。</p>
<p>怎么解决低频混音问题，已经有了无数文章、帖子来讨论，涉及到房间处理、音箱摆位、音箱种类、昂贵的高精度线材等，问题不减反增。那么，怎样利用现有的工具呢？</p>
<p>相信<strong>参数化均衡器</strong>吧。简单而言，在 100Hz 处高切。如图所示：</p>
<h5 id="步骤-1"><a href="#步骤-1" class="headerlink" title="步骤"></a>步骤</h5><ul>
<li>在总输出轨上启用一个 EQ 效果器</li>
<li>在 100Hz 处高切，用最陡峭的 Q 值，这样 100Hz 以上的频率就都被切掉了</li>
<li>激活此 EQ 效果器，播放曲子</li>
<li>Mute 掉所有<strong>理应</strong>出现在低频部分的乐器，如底鼓和贝司</li>
<li>现在，哪些乐器本来不该出现在低频范围却窜到了下边，就一目了然了</li>
</ul>
<p>就算监听很糟糕，这个方法也能适用。100Hz 高切能显示出不该出现在低频范围的声音，一目了然。甚至戴耳机混音，也可以用这个方法。</p>
<p>你可以逐轨进行清理，直到低频范围令你满意为止。然后把底鼓、贝司放进来，听听看是不是它们更清晰了。接下来，再处理底鼓和贝司之间的打架问题即可。</p>
<p>注意：这并不是说，100Hz 里出现声音就一定是坏事。记住，相信自己的耳朵，在有些编曲场合下，低频信号是有利于曲子的，要审时度势。</p>
<h4 id="技巧-3：粉噪法"><a href="#技巧-3：粉噪法" class="headerlink" title="技巧 3：粉噪法"></a>技巧 3：粉噪法</h4><p>在电子乐混音中，参考电平非常直观，多数制作人会依照底鼓去混音，换句话说，所有其他声部都围绕着底鼓的电平去处理。但在其他风格的乐曲里，鼓组不一定是核心声部，那么要怎么做呢？</p>
<p><strong>校准好一个粉噪，将其作为参考电平。</strong>一句话概括：参考粉噪的电平来混其他声部。为何不用白噪而是粉噪呢？因为粉噪比白噪更接近我们听声的直觉。至于更深层的解释，已经超出了本文范围。</p>
<p>这样，太响的元素就会显得十分突出。有些声部可能会被遮蔽，仍需要仔细听辩，这时多了一个粉噪作为参照物，工作起来就会更加顺畅。</p>
<p>任何一个声部都不应该独占编曲，就算音量层层叠加，总体上也要能包得住。</p>
<p>你或许需要一点时间来习惯这种工作方式，想必也会发现它的优势。</p>
<p>生成粉噪的工具有很多，基本的测试信号生成器就能做到。也可以使用 Voxengo SPAN 这类插件来生成。</p>
<p>另一款免费的 MDA 插件包里也有信号生成器（<a href="http://mda.smartelectronix.com/" target="_blank" rel="noopener">http://mda.smartelectronix.com/</a>），但是目前没有 64 位版，所以无法在 Logic Pro X 里使用。</p>
<h5 id="步骤-2"><a href="#步骤-2" class="headerlink" title="步骤"></a>步骤</h5><p>先设置 MDA Test Tone 插件，让它过一下 Voxengo SPAN 插件。</p>
<ul>
<li><p>在总输出轨上启用 MDA 噪音生成器</p>
</li>
<li><p>将 Mode 设置为 Pink Noise</p>
</li>
<li><p>将 Output 设置为 All Channels</p>
</li>
<li><p>启用 Audio Thru 框</p>
</li>
<li><p>将 Level 设置为 -23dB</p>
</li>
<li></li>
<li><p>载入 SPAN</p>
</li>
<li><p>选择 K-14（会把满调幅零点放在 -14dB 的位置，给你的混音预留大量空间）</p>
</li>
<li><p>调节粉噪的电平，让峰值大概处于 0 的位置，RMS 电平在 -8 到 -9 的位置。多多关注 RMS 电平，而不是峰值，具体原因此处就不赘述了</p>
</li>
</ul>
<p>如果使用 Logic Pro X 自带的测试音频工具，请注意它不支持音频穿越，你需要将它放在立体声 bus 轨上，然后输出到立体声总轨。</p>
<ul>
<li><p>选择一个立体声 Aux 轨，载入 Test Oscillator 插件</p>
</li>
<li><p>选择 Pink Noise</p>
</li>
<li><p>将电平设置为 -16dB</p>
</li>
<li></li>
<li><p>载入 SPAN</p>
</li>
<li><p>选择 K-14。-16dB 的粉噪输出应该会让峰值处于 -0.5 左右，RMS 在 -9 左右</p>
</li>
</ul>
<p>注意：如果你无法使用，或不愿使用 SPAN，或者用不了 K-14 metering，对应的满调幅峰值为 -13dBFS，RMS -25dBFS。</p>
<p>这条技巧有两个价值：第一，你可以得到一个校准过、客观的参照物；第二，预留了后期和母带的空间。</p>
<h4 id="技巧-3：MS-处理"><a href="#技巧-3：MS-处理" class="headerlink" title="技巧 3：MS 处理"></a>技巧 3：MS 处理</h4><p>Mid-side 处理是对声部、bus 或最终混音进行立体声声相的控制方法，它基于音频信号的摆位。</p>
<p>Mid（中央）通道是指在立体声相位中处于中央的信号，增强 Mid 信号会让声音更加集中、窄小、单声道化。</p>
<p>Side（边缘）通道就是在立体声相位四周的信号。增强 Side 信号会让声音更加宽广，使中央部分的空间更大。</p>
<p>那么，反过来就很好理解了。如果我们降低 Mid 电平，不动 Side 的电平，就可以在不提升整体电平的情况下制造出大量的空间。如果降低 Side 信号电平，声音就会更像单声道，更加汇聚在中央，像贝司等低频声部就非常适合后者。</p>
<h5 id="怎样做"><a href="#怎样做" class="headerlink" title="怎样做"></a>怎样做</h5><p>选择一款支持 M/S 的 EQ 插件，例如 Logic Pro X 的自带 EQ、Ableton 的 EQ 8、Fab Filter 的 Pro Q 2，或者 Izotope Ozone 等。</p>
<p>我们假设要处理一条贝司，带一些合唱效果，需要将它的低频更「单声道化」，而又不损失合唱效果带来的高频段共鸣的宽度。</p>
<p>效果器链这样：贝司音源 -&gt; 合唱效果 -&gt; M/S EQ，如图：</p>
<p>上图的效果全关，光谱如下图：</p>
<p>注意：贝司声在相位分析器中显示出一个几乎完全是单声道的图形，在 FFT 分析器（左）里则显示出多层共鸣。</p>
<p>让我们启用合唱效果（选择 Mega Wide Chorus），看看发生了什么变化：</p>
<p>现在看看右边的相位分析器，可以明显看到新增的立体声信号。但是从上到下，直到 30Hz 都有立体声信号。FFT 则没有什么变化。</p>
<p>然后，让我们添加一个仅作用于 Side 信号的高通滤波器，切到 220Hz 处。</p>
<p>再对比一下分析器，FFT 里产生了一些变化，但更重要的是信号变成单声道/宽广共存的声音了。简而言之就是 200Hz 以下都变成了单声道，高于这个位置的频率仍然有立体声的声相。</p>
<h5 id="总线处理，还是终混处理？"><a href="#总线处理，还是终混处理？" class="headerlink" title="总线处理，还是终混处理？"></a>总线处理，还是终混处理？</h5><p>采用上边的技巧，无论是在集合了若干声部的总线上，还是总输出轨上，都能达到清晰度和声音稳定程度的保障。</p>
<p>在衰减 Side 信号时需要注意的是，衰减值不当可能导致声音被「钉」在奇怪的声场当中，因为缺少底部的支撑。适当地推起 Side 信号，可以为乐曲制造出所谓的「呼吸空间」。</p>
<h5 id="创造性-M-S-处理"><a href="#创造性-M-S-处理" class="headerlink" title="创造性 M/S 处理"></a>创造性 M/S 处理</h5><p>Voxengo 有一款免费的 M/S 处理插件 MSED。它原本是用来解码 M/S 技术录制的音频。作为一款均衡器，它也能用作 M/S 增益控制器。也就是说，你可以分开控制 Mid 或 Side 信号的增益值。用它衰减掉 Mid 信号后，留下的 Side 信号也不会被过分影响。用它提升立体声的宽度，能够避免一般立体声技术产生的哈斯效应（Haas Effect）。</p>
<h4 id="结论"><a href="#结论" class="headerlink" title="结论"></a>结论</h4><p>这篇文章内容较杂，论及的要点都是为了让你获得更多混音上的改进空间。</p>
<p>本文转载自:<a href="https://soundmono.com/4-mixing-techniques-to-help-take-your-music-to-the-next-level.html" target="_blank" rel="noopener">https://soundmono.com/4-mixing-techniques-to-help-take-your-music-to-the-next-level.html</a> </p>
<p><strong>本帖附件</strong></p>
<p><a href="https://u21519047.pipipan.com/fs/21519047-395416051" target="_blank" rel="noopener">点击下载</a></p>
<p><em>有瓣音频 – 有伴你我,更多编曲混音技术尽在有瓣音频</em></p>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="tags/混音档案/" rel="tag"># 混音档案</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="加强鼓组音色的冲击力.html" rel="next" title="加强鼓组音色的冲击力">
                <i class="fa fa-chevron-left"></i> 加强鼓组音色的冲击力
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="Logic-Pro-X-系列教程-11：混音能手.html" rel="prev" title="Logic Pro X 系列教程 11：混音能手">
                Logic Pro X 系列教程 11：混音能手 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>


    <!-- newban文章内嵌广告 -->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle" style="display:block; text-align:center;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-2626449904708114" data-ad-slot="4238589764"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>

    <div class="post-spread">
      
    </div>
  </div>
  <!-- newban信息流广告 -->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle" style="display:block" data-ad-format="fluid" data-ad-layout-key="-6t+ed+2i-1n-4w" data-ad-client="ca-pub-2626449904708114" data-ad-slot="6790755005"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <p class="site-author-name" itemprop="name">有瓣</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">45</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            

            
              
              
              <div class="site-state-item site-state-tags">
                
                  <span class="site-state-item-count">17</span>
                  <span class="site-state-item-name">标签</span>
                
              </div>
            

          </nav>

          

          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-4"><a class="nav-link" href="#技巧-1：光谱分析"><span class="nav-number">1.</span> <span class="nav-text">技巧 1：光谱分析</span></a><ol class="nav-child"><li class="nav-item nav-level-5"><a class="nav-link" href="#步骤"><span class="nav-number">1.1.</span> <span class="nav-text">步骤</span></a></li></ol></li><li class="nav-item nav-level-4"><a class="nav-link" href="#技巧-2：走出泥潭"><span class="nav-number">2.</span> <span class="nav-text">技巧 2：走出泥潭</span></a><ol class="nav-child"><li class="nav-item nav-level-5"><a class="nav-link" href="#步骤-1"><span class="nav-number">2.1.</span> <span class="nav-text">步骤</span></a></li></ol></li><li class="nav-item nav-level-4"><a class="nav-link" href="#技巧-3：粉噪法"><span class="nav-number">3.</span> <span class="nav-text">技巧 3：粉噪法</span></a><ol class="nav-child"><li class="nav-item nav-level-5"><a class="nav-link" href="#步骤-2"><span class="nav-number">3.1.</span> <span class="nav-text">步骤</span></a></li></ol></li><li class="nav-item nav-level-4"><a class="nav-link" href="#技巧-3：MS-处理"><span class="nav-number">4.</span> <span class="nav-text">技巧 3：MS 处理</span></a><ol class="nav-child"><li class="nav-item nav-level-5"><a class="nav-link" href="#怎样做"><span class="nav-number">4.1.</span> <span class="nav-text">怎样做</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#总线处理，还是终混处理？"><span class="nav-number">4.2.</span> <span class="nav-text">总线处理，还是终混处理？</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#创造性-M-S-处理"><span class="nav-number">4.3.</span> <span class="nav-text">创造性 M/S 处理</span></a></li></ol></li><li class="nav-item nav-level-4"><a class="nav-link" href="#结论"><span class="nav-number">5.</span> <span class="nav-text">结论</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">有瓣</span>
  <div>
  <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
  <span id="busuanzi_container_site_pv">本站总访问量<span id="busuanzi_value_site_pv"></span>次</span>
  </div>
  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Muse</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
          <span id="scrollpercent"><span>0</span>%</span>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="js/src/motion.js?v=5.1.4"></script>



  
  

  
  <script type="text/javascript" src="js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  

  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    var path = "/booya/" + search_path;
    // monitor main search box;

    var onPopupClose = function (e) {
      $('.popup').hide();
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $(".local-search-pop-overlay").remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
        .css('overflow', 'hidden');
      $('.search-popup-overlay').click(onPopupClose);
      $('.popup').toggle();
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }

    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';

      // start loading animation
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay">' +
          '<div id="search-loading-icon">' +
          '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
          '</div>' +
          '</div>')
        .css('overflow', 'hidden');
      $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');

      $.ajax({
        url: path,
        dataType: isXml ? "xml" : "json",
        async: true,
        success: function(res) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = isXml ? $("entry", res).map(function() {
            return {
              title: $("title", this).text(),
              content: $("content",this).text(),
              url: $("url" , this).text()
            };
          }).get() : res;
          var input = document.getElementById(search_id);
          var resultContent = document.getElementById(content_id);
          var inputEventFunction = function() {
            var searchText = input.value.trim().toLowerCase();
            var keywords = searchText.split(/[\s\-]+/);
            if (keywords.length > 1) {
              keywords.push(searchText);
            }
            var resultItems = [];
            if (searchText.length > 0) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var hitCount = 0;
                var searchTextCount = 0;
                var title = data.title.trim();
                var titleInLowerCase = title.toLowerCase();
                var content = data.content.trim().replace(/<[^>]+>/g,"");
                var contentInLowerCase = content.toLowerCase();
                var articleUrl = decodeURIComponent(data.url);
                var indexOfTitle = [];
                var indexOfContent = [];
                // only match articles with not empty titles
                if(title != '') {
                  keywords.forEach(function(keyword) {
                    function getIndexByWord(word, text, caseSensitive) {
                      var wordLen = word.length;
                      if (wordLen === 0) {
                        return [];
                      }
                      var startPosition = 0, position = [], index = [];
                      if (!caseSensitive) {
                        text = text.toLowerCase();
                        word = word.toLowerCase();
                      }
                      while ((position = text.indexOf(word, startPosition)) > -1) {
                        index.push({position: position, word: word});
                        startPosition = position + wordLen;
                      }
                      return index;
                    }

                    indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
                    indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
                  });
                  if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
                    isMatch = true;
                    hitCount = indexOfTitle.length + indexOfContent.length;
                  }
                }

                // show search results

                if (isMatch) {
                  // sort index by position of keyword

                  [indexOfTitle, indexOfContent].forEach(function (index) {
                    index.sort(function (itemLeft, itemRight) {
                      if (itemRight.position !== itemLeft.position) {
                        return itemRight.position - itemLeft.position;
                      } else {
                        return itemLeft.word.length - itemRight.word.length;
                      }
                    });
                  });

                  // merge hits into slices

                  function mergeIntoSlice(text, start, end, index) {
                    var item = index[index.length - 1];
                    var position = item.position;
                    var word = item.word;
                    var hits = [];
                    var searchTextCountInSlice = 0;
                    while (position + word.length <= end && index.length != 0) {
                      if (word === searchText) {
                        searchTextCountInSlice++;
                      }
                      hits.push({position: position, length: word.length});
                      var wordEnd = position + word.length;

                      // move to next position of hit

                      index.pop();
                      while (index.length != 0) {
                        item = index[index.length - 1];
                        position = item.position;
                        word = item.word;
                        if (wordEnd > position) {
                          index.pop();
                        } else {
                          break;
                        }
                      }
                    }
                    searchTextCount += searchTextCountInSlice;
                    return {
                      hits: hits,
                      start: start,
                      end: end,
                      searchTextCount: searchTextCountInSlice
                    };
                  }

                  var slicesOfTitle = [];
                  if (indexOfTitle.length != 0) {
                    slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
                  }

                  var slicesOfContent = [];
                  while (indexOfContent.length != 0) {
                    var item = indexOfContent[indexOfContent.length - 1];
                    var position = item.position;
                    var word = item.word;
                    // cut out 100 characters
                    var start = position - 20;
                    var end = position + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if (end < position + word.length) {
                      end = position + word.length;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
                  }

                  // sort slices in content by search text's count and hits' count

                  slicesOfContent.sort(function (sliceLeft, sliceRight) {
                    if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
                      return sliceRight.searchTextCount - sliceLeft.searchTextCount;
                    } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
                      return sliceRight.hits.length - sliceLeft.hits.length;
                    } else {
                      return sliceLeft.start - sliceRight.start;
                    }
                  });

                  // select top N slices in content

                  var upperBound = parseInt('1');
                  if (upperBound >= 0) {
                    slicesOfContent = slicesOfContent.slice(0, upperBound);
                  }

                  // highlight title and content

                  function highlightKeyword(text, slice) {
                    var result = '';
                    var prevEnd = slice.start;
                    slice.hits.forEach(function (hit) {
                      result += text.substring(prevEnd, hit.position);
                      var end = hit.position + hit.length;
                      result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
                      prevEnd = end;
                    });
                    result += text.substring(prevEnd, slice.end);
                    return result;
                  }

                  var resultItem = '';

                  if (slicesOfTitle.length != 0) {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>";
                  } else {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>";
                  }

                  slicesOfContent.forEach(function (slice) {
                    resultItem += "<a href='" + articleUrl + "'>" +
                      "<p class=\"search-result\">" + highlightKeyword(content, slice) +
                      "...</p>" + "</a>";
                  });

                  resultItem += "</li>";
                  resultItems.push({
                    item: resultItem,
                    searchTextCount: searchTextCount,
                    hitCount: hitCount,
                    id: resultItems.length
                  });
                }
              })
            };
            if (keywords.length === 1 && keywords[0] === "") {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>'
            } else if (resultItems.length === 0) {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>'
            } else {
              resultItems.sort(function (resultLeft, resultRight) {
                if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
                  return resultRight.searchTextCount - resultLeft.searchTextCount;
                } else if (resultLeft.hitCount !== resultRight.hitCount) {
                  return resultRight.hitCount - resultLeft.hitCount;
                } else {
                  return resultRight.id - resultLeft.id;
                }
              });
              var searchResultList = '<ul class=\"search-result-list\">';
              resultItems.forEach(function (result) {
                searchResultList += result.item;
              })
              searchResultList += "</ul>";
              resultContent.innerHTML = searchResultList;
            }
          }

          if ('auto' === 'auto') {
            input.addEventListener('input', inputEventFunction);
          } else {
            $('.search-icon').click(inputEventFunction);
            input.addEventListener('keypress', function (event) {
              if (event.keyCode === 13) {
                inputEventFunction();
              }
            });
          }

          // remove loading animation
          $(".local-search-pop-overlay").remove();
          $('body').css('overflow', '');

          proceedsearch();
        }
      });
    }

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function(e){
      e.stopPropagation();
    });
    $(document).on('keyup', function (event) {
      var shouldDismissSearchPopup = event.which === 27 &&
        $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });
  </script>





  

  

  

  
  

  

  

  

</body>
</html>
